﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Reminder.Tests
{
    [TestClass]
    public class ReminderBuilderFixture
    {
        [TestMethod]
        public void CreateReminderWithData()
        {
            var reminder = new ReminderBuilder()
                                    .AddDays(1)
                                    .AddHours(2)
                                    .AddMinutes(3)
                                    .AddSeconds(4)
                                    .Build();   /* Full fluent usage */

            Assert.IsInstanceOfType(reminder, typeof(Reminder));

            var reminder1 = new ReminderBuilder("Daily")
                                .AddDays(1).AddMinutes(2).Build(); /* Part usage */
            StringAssert.Equals("Daily", reminder1.Name);

            var reminder2 = new ReminderBuilder("Daily", "Good Morning")
                                .AddDays(1).AddMinutes(2).Build(); /* Part usage */
            StringAssert.Equals("Daily", reminder1.Name);
            StringAssert.Equals("Good Morning", reminder1.Message);
        }
    }
}
